<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
   <script>
       //需要一个数组来储存选手得到的10个分数
       //简单的js数组
       var array = new Array();
       for(var i = 0;i < 10;i ++){
           var score = parseFloat(prompt("请输入第"+(i + 1)+"个评委给出的分数"));
           array.push(score);
       }
       var sum = 0;
       var max = 0;
       var min = array[0];
       for(var i = 0;i < 10;i ++){
           sum += array[i];
           if(array[i] > max){
               max = array[i];
           }
           if(min > array[i]){
               min = array[i];
           }
       }
       document.write("选手的最终平均分为：" +(sum-(max + min))/8);
   </script>
</body>
</html>